import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'
// 配置element-plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 配置pinia持久化
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
// 配置粒子背景
import Particles from "@tsparticles/vue3";
import { loadSlim } from "@tsparticles/slim";

const app = createApp(App)
app.use(pinia)
app.use(router)
// 挂载
app.use(ElementPlus)
app.use(Particles, {
    init: async engine => {
        await loadSlim(engine); 
    },
})

app.mount('#app')
